package com.heatup.apt.api.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.framework.service.ISuperService;
import com.heatup.apt.model.order.OrderFinished;
import com.heatup.apt.model.order.OrderInfo;
import com.heatup.apt.model.user.UserInfo;
import com.heatup.apt.model.vo.CasherResolveLog;
import com.heatup.apt.model.vo.MealListVO;

/**
 * 
 * @author Jindaodaxia
 *
 */
public interface OrderService extends ISuperService<OrderInfo> {

	OrderInfo getOrderById(int orderId);

	Map<String, Object> getOrderInfo(int orderId) throws Exception;

	boolean cancelOrder(int orderId, int courseId) throws Exception;

    OrderFinished queryUserLeasonsCount(Integer userId);

	/**
	 * 查询教练已完成课时统计
	 *
	 * @param mobile 教练手机
	 * @return
	 */
	OrderFinished queryCoachFinishedCourseCount(String mobile);
	
	Map<String,Object> ifRefund(int orderId, int courseId);
	
	boolean isBookCourseForUser(int courseId,int userId);
	
	public Map<String,Object> checkPayOrderType(UserInfo userInfo, int courseId, int serviceType, int sotreId, Date selfTime, Integer orderId);
	
	/**
	 * 包月卡订单校验
	 * @param userInfo
	 * @param serviceId
	 * @param productId
	 * @return
	 */
	public Map<String,Object> checkPayCarMonthOrderType(UserInfo userInfo,Integer serviceId,Integer productId);

	/**
	 * 检验门店自助健身订单数量
	 * @param storeId
	 * @param startTime
	 * @return
	 */
	public Map<String,Object> checkStoreSelfOrderCount(Integer storeId,String startTime);
	
	/**
	 * 获取用户参数
	 */
	public int getUserMealCount(Integer UserId);
	
	 /**
     * 获取累计消费餐券总和
     */
	MealListVO queryMealDetailCount(Integer userId);
    
    /**
     * 获取消费餐券记录
     */
    List<MealListVO> queryMealDetail(Map<String, Integer> param);
    
    /**
     * 根据订单id查询用餐订单详情
     */
    MealListVO queryMealOrderDetail(Integer orderId);
    
    
    /**
     * 私教消费餐
     */
    List<MealListVO> queryTomrrowMealList(String dateTime);
    
    /**
     * 私教餐汇总
     */
    MealListVO queryTomrrowMealSum(String dateTime);
    /**
     * 团课汇总
     */
    List<MealListVO> queryTomrrowTeamMealList(String dateTime);
    /**
     * 团课人数汇总
     */
    int queryAllTeamPersonByDay(String dateTime);
    
    /**
     *  根据收银员id查询对应收银员的收款记录 
     *    @param casherId
	  * @param dateTime
	  * @return
     */
	List<CasherResolveLog> queryCasherLog(Integer casherId, String dateTime);
	/**
	 *  根据收银员id查询对应收银员的收款统计
	 * @param casherId
	 * @param dateTime
	 * @return
	 */
	CasherResolveLog queryCasherSumMoney(Integer casherId, String dateTime);

}
